<?php
// src/Acme/StoreBundle/Entity/Product.php
namespace Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="purchase_dairies")
 */
class PurchaseDairy {
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
    
    /**
     * @ORM\Column(type="date")
     */
    protected $date;
    
    /**
     * @ORM\Column(type="smallint")
     */
    protected $totalRecords;
    
    /**
     * @ORM\Column(type="smallint")
     */
    protected $totalCheckIns;
    
    /**
     * @ORM\Column(type="smallint")
     */
    protected $totalFails;
    
    /**
     * @ORM\Column(type="float")
     */
    protected $totalDist;
    
    /**
     * @ORM\ManyToOne(targetEntity="Purchase", inversedBy="dailies")
     **/
    protected $owner;
    
    
    public function __construct()
    {
        $this->totalRecords = 0;
        $this->totalCheckIns = 0;
        $this->totalFails = 0;
        $this->totalDist = 0;
        $this->date = new \DateTime('now');
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return PurchaseDaily
     */
    public function setDate($date)
    {
        $this->date = $date;
    
        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set totalRecords
     *
     * @param integer $totalRecords
     * @return PurchaseDaily
     */
    public function setTotalRecords($totalRecords)
    {
        $this->totalRecords = $totalRecords;
    
        return $this;
    }

    /**
     * Get totalRecords
     *
     * @return integer 
     */
    public function getTotalRecords()
    {
        return $this->totalRecords;
    }

    /**
     * Set totalCheckIns
     *
     * @param integer $totalCheckIns
     * @return PurchaseDaily
     */
    public function setTotalCheckIns($totalCheckIns)
    {
        $this->totalCheckIns = $totalCheckIns;
    
        return $this;
    }

    /**
     * Get totalCheckIns
     *
     * @return integer 
     */
    public function getTotalCheckIns()
    {
        return $this->totalCheckIns;
    }

    /**
     * Set totalFails
     *
     * @param integer $totalFails
     * @return PurchaseDaily
     */
    public function setTotalFails($totalFails)
    {
        $this->totalFails = $totalFails;
    
        return $this;
    }

    /**
     * Get totalFails
     *
     * @return integer 
     */
    public function getTotalFails()
    {
        return $this->totalFails;
    }

    /**
     * Set totalDist
     *
     * @param float $totalDist
     * @return PurchaseDaily
     */
    public function setTotalDist($totalDist)
    {
        $this->totalDist = $totalDist;
    
        return $this;
    }

    /**
     * Get totalDist
     *
     * @return float 
     */
    public function getTotalDist()
    {
        return $this->totalDist;
    }

    /**
     * Set owner
     *
     * @param \Entity\Purchase $owner
     * @return PurchaseDaily
     */
    public function setOwner(\Entity\Purchase $owner = null)
    {
        $this->owner = $owner;
    
        return $this;
    }

    /**
     * Get owner
     *
     * @return \Entity\Purchase 
     */
    public function getOwner()
    {
        return $this->owner;
    }
}